package cn.bjc.pet.domain;

import cn.bjc.basic.domain.BaseDomain;
import cn.bjc.org.domain.Shop;
import cn.bjc.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet extends BaseDomain {
    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    
    private Long type_id;
    private PetType type;
    
    private String resources;
    
    //默认下架
    private Integer state = 0;
    
    //下架时间,不给初值
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date offsaletime;
    
    //上架时间,不给初值
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date onsaletime;
    
    //创建时间,要给初值
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date createtime = new Date();
    
    //店铺id
    private Long shop_id;
    //店铺id对应的shop
    private Shop shop;
    
    //用户id
    private Long user_id;
    //用户id对应的user
    private User user;
    
    //寻主的id
    private Long search_master_msg_id;
    
    //详情对象,为了接收前端传来的数据
    private PetDetail petDetail;
}
